package sysu.el.array.algors;

public class MinElem {
	static public int Int(int num, int elems[]){
		return MinElem.Int(num, elems, Integer.MAX_VALUE);
	}
	
	static public int Int(int num, int elems[], int init){
		int min = init;
		for (int i=0; i<num; i++)
			if (min > elems[i])
				min = elems[i];
		return min;
	}
	
	static public double Double(int num, int elems[]){
		double min = Double.MAX_VALUE;
		for (int i=0; i<num; i++)
			if (min > elems[i])
				min = elems[i];
		return min;
	}
}
